package com.mycompany.mvc.quartz;

import java.io.File;

import org.springframework.stereotype.Component;

import com.mycompany.mvc.config.SystemConfig;

/**
 * @author Jintao_Ma
 * @time 2016年7月25日21:45:35
 * @description：
 * 	文件删除类，可删除多个文件夹下的文件
 */

@Component("fileDelete")
public class FileDelete {

	private String folder = SystemConfig.getProperty("delTempFile");
	
	private String[] folders={folder};
	
    private static void delFiles(String[] folders) {
        for (int i = 0; i < folders.length; i++) {
            File f = new File(folders[i]);
            File[] files = null;
            if (f.exists()) {
                files = f.listFiles();
                for (int j = 0; j < files.length; j++) {
                    files[j].delete();
                }
            }
        }
    }
	
	public void fileDelete_delFile(){
//		delFiles(folders);
	}
	
}
